package com.eco.fanliapp.controller.app;

import com.eco.fanliapp.common.base.BaseController;
import com.eco.fanliapp.common.response.ServerResponse;
import com.eco.fanliapp.service.ITaoBaoGetDetailDescService;
import com.eco.fanliapp.service.ITaoBaoOrderNewService;
import com.eco.fanliapp.vo.TaoBaoGetDetailInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/mobile/tb")
public class TaoBaoController extends BaseController {

	@Autowired
	private ITaoBaoGetDetailDescService iTaoBaoGetDetailDescService;
	@Autowired
	private ITaoBaoOrderNewService iTaoBaoOrderNewService;
	
	//获取商品店铺详情和图文详情
	@GetMapping("/desc")
	@ResponseBody
	public ServerResponse<TaoBaoGetDetailInfo> getDetail(String itemId) {
		
		return iTaoBaoGetDetailDescService.getTaoBaoGetDetail(itemId);
	}

	@GetMapping("/test")
	@ResponseBody
	public ServerResponse test(Long userId, Long tradeId) {
		Object bj = iTaoBaoOrderNewService.testHandle(userId, tradeId);
		return ServerResponse.createBySuccess("测试成功",bj);
	}
	
}
